-- GENERATED SPELL FOR [Scorch Imp] --


function spell0_21021(pUnit, Event) --@Fire Ward,Self--
pUnit:FullCastSpellOnTarget(37844,pUnit)
pUnit:RegisterEvent('Sorts_21021', 30344, 1)
end

function spell1_21021(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21021', 3000, 1)
end

function Sorts_21021(pUnit, Event)
local choix_sorts_21021 = math.random(0, 1)
if choix_sorts_21021 == 0 then
pUnit:RegisterEvent('spell0_21021', 1, 1)
end
if choix_sorts_21021 == 1 then
pUnit:RegisterEvent('spell1_21021', 1, 1)
end
end

function mob21021_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21021', math.random(1500, 3000), 1)
end

function mob21021_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21021_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21021_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21021, 1, 'mob21021_Action')
RegisterUnitEvent(21021, 2, 'mob21021_Leave')
RegisterUnitEvent(21021, 3, 'mob21021_Kill')
RegisterUnitEvent(21021, 4, 'mob21021_Die')
